package com.pyue.eam.app.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pyue.eam.admin.api.dto.SimpleUserInfo;
import com.pyue.eam.app.api.dto.AppUserDTO;
import com.pyue.eam.app.api.dto.AppUserInfo;
import com.pyue.eam.app.api.entity.AppUser;
import com.pyue.eam.app.api.vo.AppUserExcelVO;
import com.pyue.eam.app.api.vo.AppUserVO;
import com.pyue.eam.common.core.util.R;
import org.springframework.validation.BindingResult;

import java.util.ArrayList;
import java.util.List;

/**
 * app用户表
 *
 * @author aeizzz
 * @date 2022-12-07 09:52:03
 */
public interface AppUserService extends IService<AppUser> {

    Boolean updateUser(AppUserDTO appUser);

    Boolean saveUser(AppUserDTO appUser);

    List<AppUserExcelVO> listUser(AppUserDTO appUser);

    IPage getUsersWithRolePage(Page page, AppUserDTO appUserDTO);

    AppUserInfo findUserInfo(AppUser user);

    R updateUserInfo(AppUserDTO userDto);

    AppUserVO selectUserVoById(Long userId);

    Boolean deleteAppUserByIds(Long[] ids);

    R importUser(List<AppUserExcelVO> excelVOList, BindingResult bindingResult);

    R registerAppUser(AppUserDTO appUser);

    Boolean switchRoleType(String roleTypeId);

    List<String> getWxOpenIdByMiniOpenId(List<String> miniOpenIdList);

    List<String> getWxOpenIdByAppUserId(List<Long> userIdList);

    String getWxOpenIdByAppUserId(String userId);

    /**
     * 找到所有的团长微信openId
     */
    List<String> getAllRegiWxOpenId();

    /**
     * 获取所有租户的团长id
     */
    List<Long> getAllRegiUserId();

    List<SimpleUserInfo> getSimpleUserInfoByIds(List<Long> userIdList);
}
